package com.rock.controller;

import com.rock.cache.UserCache;
import com.rock.entity.SysUser;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class SysUserCacheController {
  final UserCache userCache;

  @GetMapping("user")
  public SysUser getUser() {
    return userCache.getUserByName("admin");
  }

}
